/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define D35_Pin GPIO_PIN_13
#define D35_GPIO_Port GPIOC
#define ADC_VIN_CAPTURE_Pin GPIO_PIN_0
#define ADC_VIN_CAPTURE_GPIO_Port GPIOC
#define ADC_BAT_VOLTAGE_SENSE_Pin GPIO_PIN_1
#define ADC_BAT_VOLTAGE_SENSE_GPIO_Port GPIOC
#define ADC_NTC4_VOLTAGE_Pin GPIO_PIN_2
#define ADC_NTC4_VOLTAGE_GPIO_Port GPIOC
#define ADC_NTC5_VOLTAGE_Pin GPIO_PIN_3
#define ADC_NTC5_VOLTAGE_GPIO_Port GPIOC
#define UART4_RS485_TX_Pin GPIO_PIN_0
#define UART4_RS485_TX_GPIO_Port GPIOA
#define UART4_RS485_RX_Pin GPIO_PIN_1
#define UART4_RS485_RX_GPIO_Port GPIOA
#define UART2_RS485_TX_Pin GPIO_PIN_2
#define UART2_RS485_TX_GPIO_Port GPIOA
#define UART2_RS485_RX_Pin GPIO_PIN_3
#define UART2_RS485_RX_GPIO_Port GPIOA
#define ADC_NTC0_VOLTAGE_Pin GPIO_PIN_4
#define ADC_NTC0_VOLTAGE_GPIO_Port GPIOA
#define ADC_NTC1_VOLTAGE_Pin GPIO_PIN_5
#define ADC_NTC1_VOLTAGE_GPIO_Port GPIOA
#define ADC_NTC2_VOLTAGE_Pin GPIO_PIN_6
#define ADC_NTC2_VOLTAGE_GPIO_Port GPIOA
#define ADC_NTC3_VOLTAGE_Pin GPIO_PIN_7
#define ADC_NTC3_VOLTAGE_GPIO_Port GPIOA
#define ADC_NTC6_VOLTAGE_Pin GPIO_PIN_4
#define ADC_NTC6_VOLTAGE_GPIO_Port GPIOC
#define ADC_NTC7_VOLTAGE_Pin GPIO_PIN_5
#define ADC_NTC7_VOLTAGE_GPIO_Port GPIOC
#define ADC_BUS_CURRENT1_Pin GPIO_PIN_0
#define ADC_BUS_CURRENT1_GPIO_Port GPIOB
#define ADC_BUS_CURRENT2_Pin GPIO_PIN_1
#define ADC_BUS_CURRENT2_GPIO_Port GPIOB
#define LIGHT_EN_Pin GPIO_PIN_2
#define LIGHT_EN_GPIO_Port GPIOB
#define POWER_EN_N_Pin GPIO_PIN_7
#define POWER_EN_N_GPIO_Port GPIOE
#define UART3_RS485_TX_Pin GPIO_PIN_10
#define UART3_RS485_TX_GPIO_Port GPIOB
#define UART3_RS485_TXB11_Pin GPIO_PIN_11
#define UART3_RS485_TXB11_GPIO_Port GPIOB
#define UART3_RS485_RX_EN_N_Pin GPIO_PIN_12
#define UART3_RS485_RX_EN_N_GPIO_Port GPIOB
#define UART3_RS485_TX_EN_Pin GPIO_PIN_13
#define UART3_RS485_TX_EN_GPIO_Port GPIOB
#define UART2_RS485_TX_EN_Pin GPIO_PIN_8
#define UART2_RS485_TX_EN_GPIO_Port GPIOD
#define UART2_RS485_RX_EN_N_Pin GPIO_PIN_9
#define UART2_RS485_RX_EN_N_GPIO_Port GPIOD
#define UART4_RS485_TX_EN_Pin GPIO_PIN_10
#define UART4_RS485_TX_EN_GPIO_Port GPIOD
#define UART4_RS485_RX_EN_N_Pin GPIO_PIN_11
#define UART4_RS485_RX_EN_N_GPIO_Port GPIOD
#define CONTACTOR1_EN_Pin GPIO_PIN_14
#define CONTACTOR1_EN_GPIO_Port GPIOD
#define CONTACTOR2_EN_Pin GPIO_PIN_15
#define CONTACTOR2_EN_GPIO_Port GPIOD
#define RS485_POWER_EN_N_Pin GPIO_PIN_6
#define RS485_POWER_EN_N_GPIO_Port GPIOC
#define UART1_RS485_TX_Pin GPIO_PIN_9
#define UART1_RS485_TX_GPIO_Port GPIOA
#define UART1_RS485_RX_Pin GPIO_PIN_10
#define UART1_RS485_RX_GPIO_Port GPIOA
#define UART1_RS485_RX_EN_N_Pin GPIO_PIN_11
#define UART1_RS485_RX_EN_N_GPIO_Port GPIOA
#define UART1_RS485_TX_EN_Pin GPIO_PIN_12
#define UART1_RS485_TX_EN_GPIO_Port GPIOA
#define SW1_Pin GPIO_PIN_10
#define SW1_GPIO_Port GPIOC
#define SW2_Pin GPIO_PIN_11
#define SW2_GPIO_Port GPIOC
#define UART5_TX_FROM_MCU_Pin GPIO_PIN_12
#define UART5_TX_FROM_MCU_GPIO_Port GPIOC
#define UART5_RX_FROM_MCU_Pin GPIO_PIN_2
#define UART5_RX_FROM_MCU_GPIO_Port GPIOD
#define HV_POWER_EN_N_Pin GPIO_PIN_6
#define HV_POWER_EN_N_GPIO_Port GPIOB
#define I2C_SDA_BARO_Pin GPIO_PIN_7
#define I2C_SDA_BARO_GPIO_Port GPIOB
#define I2C_SCL_BARO_Pin GPIO_PIN_8
#define I2C_SCL_BARO_GPIO_Port GPIOB
#define IMU_INT_Pin GPIO_PIN_9
#define IMU_INT_GPIO_Port GPIOB
#define IMU_INT_EXTI_IRQn EXTI9_5_IRQn

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
